{% extends "layout.html" %} {% block body %} {% if session.logged_in %}

<div class="col-md-2">

</div>
<div class="col-md-8">
	<form action="{{ url_for('publish') }}" method=post class=add-entry>
		<div class="form-group">
			<label for="blog_title">标题</label>
			<input type="text" class="form-control" id="blog_title" style="width: 300px;" name=title placeholder="博客标题">
		</div>
		<div class="form-group">
			<label for="classify">分类</label>

			<select class="form-control" style="width: 300px;" name=type>
{% for type in alltype %}
  <option value="{{type.typeid}}">{{type.typename}}</option>
  {% endfor %}
</select>
		</div>
		<div class="form-group">
			<label for="abstract">摘要</label>
			<textarea class="form-control" id="abstract" rows="2" style="width: 352px; height: 81px;" placeholder="博客摘要">
								
							</textarea>
		</div>
		<div class="form-group">
			<label for="content">正文</label>
			<textarea class="form-control" rows="10" id="content" name=text></textarea>
		</div>
		<button type="submit" class="btn btn-default">发表</button>
	</form>
</div>
<div class="col-md-2">

</div>
{% endif %} {% endblock %}